package com.power.sifa.approve.api;

import com.plf.common.domain.ResponseDTO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import com.power.sifa.approve.model.Apl_attachment;
import com.power.sifa.approve.model.pageInfo.Apl_attachmentPageInfo;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 *  申请材料附件 Feign
 */
public interface IApl_attachmentFeign {

    /**
     * 申请材料附件分页列表
     */
    @PostMapping("/apl_attachment/list")
    ResponseDTO list(@RequestBody Apl_attachmentPageInfo apl_attachmentPageInfo);

    /**
    * 查看申请材料附件
    */
    @GetMapping("/apl_attachment/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除申请材料附件
    */
    @PostMapping("/apl_attachment/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看申请材料附件 复合主键使用
    // */
    //@PostMapping("/apl_attachment/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Apl_attachment.Apl_attachmentPK pk);

    /**
     * 修改或保存申请材料附件
     */
    @PostMapping("/apl_attachment/save")
    ResponseDTO save(@RequestBody Apl_attachment  apl_attachment);

    ///**
    // * 删除申请材料附件 复合主键使用
    // */
    //@PostMapping("/apl_attachment/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Apl_attachment.Apl_attachmentPK pk);

    /**
     * 批量删除申请材料附件
     */
    @PostMapping("/apl_attachment/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);

     /**
     * 导出excel
     */
    @PostMapping("/apl_attachment/output")
    void output(HttpServletResponse response, @RequestBody Apl_attachmentPageInfo apl_attachmentPageInfo);

     /**
     * 导出excel模板
     */
    @PostMapping("/apl_attachment/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);

     /**
     *	导入excel
     */
    @PostMapping("/apl_attachment/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;

    /**
     * 获取申请材料附件列表
     * @param applyid   申请id
     * @return
     */
    @GetMapping("/apl_attachment/queryList")
    ResponseDTO queryList(@RequestParam("applyid") String applyid);

    /**
     * 保存附件已读
     * @param id    申请材料附件id
     * @return
     */
    @PostMapping("/apl_attachment/saveRead")
    ResponseDTO saveRead(@RequestParam String id);


}
